<table class="summary">
	<tr>
		<th class="empty"> </th>
		<th class="total"><?php __('Total')?></th>
		<?php if(isset($stats['Type'])):?>
		<?php foreach($stats['Type'] as $key => $value):?>
		<th><?php echo ucfirst($key)?></th>
		<?php endforeach; ?>
		<?php endif; ?>
		<?php if(isset($stats['Heartrate'])):?>
		<?php foreach($stats['Heartrate'] as $key => $value):?>
		<th><?php echo ucfirst($key)?></th>
		<?php endforeach; ?>
		<?php endif; ?>
		<?php if(isset($stats['Ability'])):?>
		<?php foreach($stats['Ability'] as $key => $value):?>
		<th><?php echo ucfirst($key)?></th>
		<?php endforeach; ?>
		<?php endif; ?>
	</tr>
	<?php $count=1; foreach($stats['Labels'] as $num => $label):?>
	<tr class="<?php echo $label ?>">
		<td class="label"><?php echo ucfirst($label)?></td>
		<td class="total"><?php echo $timeUtility->parseTag($stats['Total'][$num][$label], $label)?></td>
		
		<?php if(isset($stats['Type'])):?>
		<?php foreach($stats['Type'] as $key => $value):?>
		<td><?php echo $timeUtility->parseTag($value[$num][$label], $label)?></td>
		<?php endforeach; ?>
		<?php endif; ?>
		
		<?php if(isset($stats['Heartrate'])):?>
		<?php foreach($stats['Heartrate'] as $key => $value):?>
		<td><?php echo $timeUtility->parseTag($value[$num][$label], $label)?></td>
		<?php endforeach; ?>
		<?php endif; ?>
		<?php if(isset($stats['Ability'])):?>
		<?php foreach($stats['Ability'] as $key => $value):?>
		<td><?php echo $timeUtility->parseTag($value[$num][$label], $label)?></td>
		<?php endforeach; ?>
		<?php endif; ?>
	</tr>
	<?php endforeach; ?>
</table>